/*
 * This class randomizes an array.
 */
package cth.tda367.beavers.glossaryGame.util;

//import java.lang.Math.*;
public class RandomTool{

	public static void Random(Object[] object){
	
		Object[] randomize = new Object[object.length];
		int i = object.length-1;
		int rnd;

		while( i >= 0){
			rnd = (int)(object.length*Math.random());
			if(randomize[rnd] == null){
				randomize[rnd] = object[i];
				i-=1;
			}
		}
		for(int k = 0; k<object.length; k++){
			object[k] = randomize[k];
		}			
	}	
}	